package abs.domain;

import java.io.Serializable;

import java.lang.StringBuilder;

import java.util.Calendar;
import java.util.LinkedHashSet;
import java.util.Set;

import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import javax.xml.bind.annotation.*;

import javax.persistence.*;

/**
 */

@Entity
@NamedQueries({
		@NamedQuery(name = "findAllGrupoProveedoress", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100cdgo", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100cdgo = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100cdgoContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100cdgo like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100clas", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100clas = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100clasContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100clas like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100esta", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100esta = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100estaContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100esta like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100fead", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100fead = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100feadAfter", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100fead > ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100feadBefore", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100fead < ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100femo", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100femo = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100femoAfter", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100femo > ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100femoBefore", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100femo < ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100load", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100load = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100loadContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100load like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100lomo", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100lomo = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100lomoContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100lomo like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100name", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100name = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100nameContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100name like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100tipo", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100tipo = ?1"),
		@NamedQuery(name = "findGrupoProveedoresByGrppr100tipoContaining", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100tipo like ?1"),
		@NamedQuery(name = "findGrupoProveedoresByPrimaryKey", query = "select myGrupoProveedores from GrupoProveedores myGrupoProveedores where myGrupoProveedores.grppr100cdgo = ?1") })
@Table(catalog = "absV2", name = "grppr100")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(namespace = "absWeb/abs/domain", name = "GrupoProveedores")
@XmlRootElement(namespace = "absWeb/abs/domain")
public class GrupoProveedores implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */

	@Column(name = "grppr100cdgo", length = 2, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	@XmlElement
	String grppr100cdgo;
	/**
	 */

	@Column(name = "grppr100name", length = 30)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100name;
	/**
	 */

	@Column(name = "grppr100tipo", length = 15)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100tipo;
	/**
	 */

	@Column(name = "grppr100clas", length = 15)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100clas;
	/**
	 */

	@Column(name = "grppr100esta", length = 1)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100esta;
	/**
	 */

	@Column(name = "grppr100load", length = 30)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100load;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "grppr100fead")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar grppr100fead;
	/**
	 */

	@Column(name = "grppr100lomo", length = 30)
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	String grppr100lomo;
	/**
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "grppr100femo")
	@Basic(fetch = FetchType.EAGER)
	@XmlElement
	Calendar grppr100femo;

	/**
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "grppr100nocia", referencedColumnName = "co000nocia", nullable = false) })
	@XmlTransient
	Companias companias;
	/**
	 */
	@OneToMany(mappedBy = "grupoProveedores", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
	@XmlElement(name = "", namespace = "")
	java.util.Set<abs.domain.Proveedores> proveedoreses;

	/**
	 */
	public void setGrppr100cdgo(String grppr100cdgo) {
		this.grppr100cdgo = grppr100cdgo;
	}

	/**
	 */
	public String getGrppr100cdgo() {
		return this.grppr100cdgo;
	}

	/**
	 */
	public void setGrppr100name(String grppr100name) {
		this.grppr100name = grppr100name;
	}

	/**
	 */
	public String getGrppr100name() {
		return this.grppr100name;
	}

	/**
	 */
	public void setGrppr100tipo(String grppr100tipo) {
		this.grppr100tipo = grppr100tipo;
	}

	/**
	 */
	public String getGrppr100tipo() {
		return this.grppr100tipo;
	}

	/**
	 */
	public void setGrppr100clas(String grppr100clas) {
		this.grppr100clas = grppr100clas;
	}

	/**
	 */
	public String getGrppr100clas() {
		return this.grppr100clas;
	}

	/**
	 */
	public void setGrppr100esta(String grppr100esta) {
		this.grppr100esta = grppr100esta;
	}

	/**
	 */
	public String getGrppr100esta() {
		return this.grppr100esta;
	}

	/**
	 */
	public void setGrppr100load(String grppr100load) {
		this.grppr100load = grppr100load;
	}

	/**
	 */
	public String getGrppr100load() {
		return this.grppr100load;
	}

	/**
	 */
	public void setGrppr100fead(Calendar grppr100fead) {
		this.grppr100fead = grppr100fead;
	}

	/**
	 */
	public Calendar getGrppr100fead() {
		return this.grppr100fead;
	}

	/**
	 */
	public void setGrppr100lomo(String grppr100lomo) {
		this.grppr100lomo = grppr100lomo;
	}

	/**
	 */
	public String getGrppr100lomo() {
		return this.grppr100lomo;
	}

	/**
	 */
	public void setGrppr100femo(Calendar grppr100femo) {
		this.grppr100femo = grppr100femo;
	}

	/**
	 */
	public Calendar getGrppr100femo() {
		return this.grppr100femo;
	}

	/**
	 */
	public void setCompanias(Companias companias) {
		this.companias = companias;
	}

	/**
	 */
	public Companias getCompanias() {
		return companias;
	}

	/**
	 */
	public void setProveedoreses(Set<Proveedores> proveedoreses) {
		this.proveedoreses = proveedoreses;
	}

	/**
	 */
	public Set<Proveedores> getProveedoreses() {
		if (proveedoreses == null) {
			proveedoreses = new java.util.LinkedHashSet<abs.domain.Proveedores>();
		}
		return proveedoreses;
	}

	/**
	 */
	public GrupoProveedores() {
	}

	/**
	 * Copies the contents of the specified bean into this bean.
	 *
	 */
	public void copy(GrupoProveedores that) {
		setGrppr100cdgo(that.getGrppr100cdgo());
		setGrppr100name(that.getGrppr100name());
		setGrppr100tipo(that.getGrppr100tipo());
		setGrppr100clas(that.getGrppr100clas());
		setGrppr100esta(that.getGrppr100esta());
		setGrppr100load(that.getGrppr100load());
		setGrppr100fead(that.getGrppr100fead());
		setGrppr100lomo(that.getGrppr100lomo());
		setGrppr100femo(that.getGrppr100femo());
		setCompanias(that.getCompanias());
		setProveedoreses(new java.util.LinkedHashSet<abs.domain.Proveedores>(that.getProveedoreses()));
	}

	/**
	 * Returns a textual representation of a bean.
	 *
	 */
	public String toString() {

		StringBuilder buffer = new StringBuilder();

		buffer.append("grppr100cdgo=[").append(grppr100cdgo).append("] ");
		buffer.append("grppr100name=[").append(grppr100name).append("] ");
		buffer.append("grppr100tipo=[").append(grppr100tipo).append("] ");
		buffer.append("grppr100clas=[").append(grppr100clas).append("] ");
		buffer.append("grppr100esta=[").append(grppr100esta).append("] ");
		buffer.append("grppr100load=[").append(grppr100load).append("] ");
		buffer.append("grppr100fead=[").append(grppr100fead).append("] ");
		buffer.append("grppr100lomo=[").append(grppr100lomo).append("] ");
		buffer.append("grppr100femo=[").append(grppr100femo).append("] ");

		return buffer.toString();
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((grppr100cdgo == null) ? 0 : grppr100cdgo.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof GrupoProveedores))
			return false;
		GrupoProveedores equalCheck = (GrupoProveedores) obj;
		if ((grppr100cdgo == null && equalCheck.grppr100cdgo != null) || (grppr100cdgo != null && equalCheck.grppr100cdgo == null))
			return false;
		if (grppr100cdgo != null && !grppr100cdgo.equals(equalCheck.grppr100cdgo))
			return false;
		return true;
	}
}
